<?php
/**
 * Timeoff management page controller
 *
 * @author Dima
 *
 */

class Admin_TimeoffController extends modules_admin_controllers_ControllerBase
{
    protected $_bForLoggedUsersOnly = true;
    
//----------------------------------------------------------------------------------------------------
    
    public function init()
    {
        if (! $this->getRequest()->isXmlHttpRequest())
        {
            parent::init();
            $this->view->title = 'Timeoff Management';
        }
        
        $this->_helper->AjaxContext()->initContext('json');     
    }
    
//----------------------------------------------------------------------------------------------------

    public function indexAction()
    {
    	$allTimeoff    = models_ReportMapper::getAllTimeOff();
    	$allReportYear = models_ReportMapper::getAllArchiveYear();
    	
//    	print_r($allTimeoff);
    	$this->view->allTimeoff    = $allTimeoff;
    	$this->view->allReportYear = $allReportYear;
    }
    
//----------------------------------------------------------------------------------------------------
     
}